.class public Lcom/ss/android/socialbase/appdownloader/c;
.super Ljava/lang/Object;
.source "AntiHijackUtils.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/ss/android/socialbase/appdownloader/c$g;,
        Lcom/ss/android/socialbase/appdownloader/c$c;,
        Lcom/ss/android/socialbase/appdownloader/c$e;,
        Lcom/ss/android/socialbase/appdownloader/c$d;,
        Lcom/ss/android/socialbase/appdownloader/c$f;
    }
.end annotation


# static fields
.field private static a:Lcom/ss/android/socialbase/appdownloader/c$e;

.field private static final b:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lcom/ss/android/socialbase/downloader/m/a$a;",
            ">;"
        }
    .end annotation
.end field

.field private static c:Lcom/ss/android/socialbase/appdownloader/c$c;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/ss/android/socialbase/appdownloader/c;->b:Ljava/util/HashMap;

    return-void
.end method

.method public static a(Les/jo0;)I
    .locals 7
    .param p0    # Les/jo0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const-string v0, "anti_hijack_dir"

    .line 67
    invoke-virtual {p0, v0}, Les/jo0;->d(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_0

    const-string v3, "dir_name"

    .line 68
    invoke-virtual {v0, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 69
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    xor-int/2addr v0, v1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    if-nez v0, :cond_1

    const/4 p0, 0x5

    return p0

    .line 70
    :cond_1
    invoke-static {}, Les/jo0;->b()Les/jo0;

    move-result-object v0

    const-string v3, "get_download_info_by_list"

    invoke-virtual {v0, v3}, Les/jo0;->a(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_3

    const-string v0, "force_enable_get_download_info_by_list"

    .line 71
    invoke-virtual {p0, v0}, Les/jo0;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 72
    invoke-static {v3, v1}, Les/jo0;->c(Ljava/lang/String;Z)V

    goto :goto_1

    :cond_2
    const/4 p0, 0x4

    return p0

    :cond_3
    :goto_1
    const-string v0, "anti_plans"

    .line 73
    invoke-virtual {p0, v0}, Les/jo0;->e(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    const/4 v0, -0x1

    if-eqz p0, :cond_6

    .line 74
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v1

    const/4 v3, 0x0

    :goto_2
    if-ge v3, v1, :cond_6

    .line 75
    invoke-virtual {p0, v3}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    if-eqz v4, :cond_5

    .line 76
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONObject;)Z

    move-result v5

    if-eqz v5, :cond_5

    const-string v5, "type"

    .line 77
    invoke-virtual {v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "jump_file_manager"

    .line 78
    invoke-virtual {v6, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_4

    const-string v6, "jump_file_manager_custom"

    invoke-virtual {v6, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_5

    .line 79
    :cond_4
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/c;->b(Lorg/json/JSONObject;)Lcom/ss/android/socialbase/appdownloader/b;

    move-result-object v0

    .line 80
    iget v0, v0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    if-nez v0, :cond_5

    return v2

    :cond_5
    add-int/lit8 v3, v3, 0x1

    goto :goto_2

    :cond_6
    return v0
.end method

.method static synthetic a(Lcom/ss/android/socialbase/appdownloader/c$c;)Lcom/ss/android/socialbase/appdownloader/c$c;
    .locals 0

    .line 1
    sput-object p0, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    return-object p0
.end method

.method public static a(Ljava/lang/String;)Lcom/ss/android/socialbase/downloader/m/a$a;
    .locals 5
    .annotation build Landroidx/annotation/NonNull;
    .end annotation

    .line 94
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    return-object v1

    :cond_0
    :try_start_0
    const-string v0, ","

    .line 95
    invoke-virtual {p0, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p0

    if-eqz p0, :cond_2

    .line 96
    array-length v0, p0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_2

    aget-object v3, p0, v2

    .line 97
    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 98
    invoke-static {v3}, Lcom/ss/android/socialbase/appdownloader/c;->b(Ljava/lang/String;)Lcom/ss/android/socialbase/downloader/m/a$a;

    move-result-object v3
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v3, :cond_1

    return-object v3

    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :catchall_0
    :cond_2
    return-object v1
.end method

.method public static a(Ljava/lang/Throwable;)Ljava/lang/String;
    .locals 2

    .line 154
    invoke-virtual {p0}, Ljava/lang/Throwable;->toString()Ljava/lang/String;

    move-result-object p0

    .line 155
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v0

    const/16 v1, 0x320

    if-le v0, v1, :cond_0

    const/4 v0, 0x0

    const/16 v1, 0x1f4

    .line 156
    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p0

    :cond_0
    return-object p0
.end method

.method private static a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/c$d;)V
    .locals 2

    .line 145
    sget-object v0, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    if-eqz v0, :cond_0

    .line 146
    invoke-static {}, Les/hm0;->c()Les/hm0;

    move-result-object v0

    sget-object v1, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    invoke-virtual {v0, v1}, Les/hm0;->b(Les/hm0$b;)V

    const/4 v0, 0x0

    .line 147
    sput-object v0, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    .line 148
    :cond_0
    new-instance v0, Lcom/ss/android/socialbase/appdownloader/c$c;

    invoke-direct {v0, p0, p1, p2, p3}, Lcom/ss/android/socialbase/appdownloader/c$c;-><init>(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/c$d;)V

    sput-object v0, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    .line 149
    invoke-static {}, Les/hm0;->c()Les/hm0;

    move-result-object p0

    sget-object p1, Lcom/ss/android/socialbase/appdownloader/c;->c:Lcom/ss/android/socialbase/appdownloader/c$c;

    invoke-virtual {p0, p1}, Les/hm0;->a(Les/hm0$b;)V

    return-void
.end method

.method private static a(Lcom/ss/android/socialbase/appdownloader/b;I)V
    .locals 2

    .line 81
    iget v0, p0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    mul-int/lit8 v0, v0, 0xa

    add-int/2addr v0, p1

    .line 82
    iput v0, p0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    goto :goto_0

    .line 83
    :cond_0
    iput p1, p0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    :goto_0
    return-void
.end method

.method public static a(Lcom/ss/android/socialbase/appdownloader/c$e;)V
    .locals 0

    .line 157
    sput-object p0, Lcom/ss/android/socialbase/appdownloader/c;->a:Lcom/ss/android/socialbase/appdownloader/c$e;

    return-void
.end method

.method public static a(Landroid/content/Context;)Z
    .locals 3

    const/4 v0, 0x1

    if-nez p0, :cond_0

    return v0

    .line 141
    :cond_0
    :try_start_0
    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->b()Z

    move-result v1

    const/16 v2, 0x1a

    if-eqz v1, :cond_1

    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    if-ge v1, v2, :cond_1

    .line 142
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->d(Landroid/content/Context;)Z

    move-result p0

    return p0

    .line 143
    :cond_1
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v1, v2, :cond_2

    invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    iget v1, v1, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I

    if-lt v1, v2, :cond_2

    .line 144
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->e(Landroid/content/Context;)Z

    move-result p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return p0

    :catchall_0
    :cond_2
    return v0
.end method

.method static synthetic a(Landroid/content/Context;Landroid/content/Intent;)Z
    .locals 0

    .line 2
    invoke-static {p0, p1}, Lcom/ss/android/socialbase/appdownloader/c;->b(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result p0

    return p0
.end method

.method public static a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;)Z
    .locals 3
    .param p1    # Landroid/content/Intent;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, 0x0

    .line 130
    :try_start_0
    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->b()Z

    move-result v1

    const/16 v2, 0x1a

    if-eqz v1, :cond_1

    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    if-ge v1, v2, :cond_1

    .line 131
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->d(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 132
    new-instance v1, Les/ql0;

    invoke-direct {v1, p0}, Les/ql0;-><init>(Landroid/content/Context;)V

    .line 133
    invoke-virtual {v1}, Les/hl0;->a()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 134
    new-instance v2, Lcom/ss/android/socialbase/appdownloader/c$a;

    invoke-direct {v2}, Lcom/ss/android/socialbase/appdownloader/c$a;-><init>()V

    invoke-static {p0, p1, p2, v2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/c$d;)V

    .line 135
    invoke-virtual {v1}, Les/ql0;->b()Landroid/content/Intent;

    move-result-object p1

    invoke-static {p0, p1}, Lcom/ss/android/socialbase/appdownloader/c;->b(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result p0

    return p0

    :cond_0
    const/4 p0, 0x1

    return p0

    .line 136
    :cond_1
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v1, v2, :cond_2

    invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    iget v1, v1, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I

    if-lt v1, v2, :cond_2

    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->e(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 137
    new-instance v1, Les/il0;

    invoke-direct {v1, p0}, Les/il0;-><init>(Landroid/content/Context;)V

    .line 138
    invoke-virtual {v1}, Les/hl0;->a()Z

    move-result v2

    if-eqz v2, :cond_2

    .line 139
    new-instance v2, Lcom/ss/android/socialbase/appdownloader/c$b;

    invoke-direct {v2}, Lcom/ss/android/socialbase/appdownloader/c$b;-><init>()V

    invoke-static {p0, p1, p2, v2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/c$d;)V

    .line 140
    invoke-virtual {v1}, Les/il0;->b()Landroid/content/Intent;

    move-result-object p1

    invoke-static {p0, p1}, Lcom/ss/android/socialbase/appdownloader/c;->b(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return p0

    :catchall_0
    :cond_2
    return v0
.end method

.method public static a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z
    .locals 5
    .param p1    # Landroid/content/Intent;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param
    .param p3    # Lcom/ss/android/socialbase/appdownloader/b;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, 0x0

    if-eqz p0, :cond_4

    if-nez p2, :cond_0

    goto :goto_0

    :cond_0
    const-string v1, "max_jump_count"

    .line 117
    invoke-virtual {p2, v1, v0}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v1

    if-gtz v1, :cond_1

    return v0

    :cond_1
    const-string v2, "sp_anti_hijack_config"

    .line 118
    invoke-virtual {p0, v2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v2

    const-string v3, "jump_unknown_source_count"

    .line 119
    invoke-interface {v2, v3, v0}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v4

    if-lt v4, v1, :cond_2

    return v0

    .line 120
    :cond_2
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_4

    .line 121
    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    const/4 v2, 0x1

    add-int/2addr v4, v2

    invoke-interface {v1, v3, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 122
    new-instance v1, Landroid/content/Intent;

    const-class v3, Lcom/ss/android/socialbase/appdownloader/view/JumpUnknownSourceActivity;

    invoke-direct {v1, p0, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/high16 v3, 0x10000000

    .line 123
    invoke-virtual {v1, v3}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    const-string v3, "intent"

    .line 124
    invoke-virtual {v1, v3, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 125
    invoke-virtual {p2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p1

    const-string p2, "config"

    invoke-virtual {v1, p2, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 126
    :try_start_0
    invoke-static {p0, v1, v0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Z)Z

    if-eqz p3, :cond_3

    .line 127
    iput v0, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_3
    return v2

    :catchall_0
    move-exception p0

    if-eqz p3, :cond_4

    .line 128
    iput v2, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    .line 129
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p2, "tryShowUnknownSourceDialog"

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object p0

    invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    iput-object p0, p3, Lcom/ss/android/socialbase/appdownloader/b;->c:Ljava/lang/String;

    :cond_4
    :goto_0
    return v0
.end method

.method public static a(Landroid/content/Context;Landroid/content/Intent;Z)Z
    .locals 3

    const/4 v0, 0x0

    if-eqz p0, :cond_2

    if-nez p1, :cond_0

    goto :goto_0

    :cond_0
    const-string v1, "start_only_for_android"

    const/4 v2, 0x1

    if-eqz p2, :cond_1

    .line 150
    :try_start_0
    invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 151
    invoke-virtual {p0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return v2

    :catchall_0
    return v0

    .line 152
    :cond_1
    invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 153
    invoke-virtual {p0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return v2

    :cond_2
    :goto_0
    return v0
.end method

.method private static a(Landroid/content/Context;Les/zn0;Landroid/content/Intent;Lorg/json/JSONObject;Z)Z
    .locals 9

    const/4 v0, 0x0

    if-eqz p3, :cond_11

    if-nez p1, :cond_0

    goto/16 :goto_6

    .line 8
    :cond_0
    new-instance v1, Lcom/ss/android/socialbase/appdownloader/b;

    invoke-direct {v1}, Lcom/ss/android/socialbase/appdownloader/b;-><init>()V

    const-string v2, "type"

    .line 9
    invoke-virtual {p3, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 10
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "runAntiHijack type = "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const-string v4, "AntiHijackUtils"

    invoke-static {v4, v3}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 11
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_11

    .line 12
    iput-object v2, v1, Lcom/ss/android/socialbase/appdownloader/b;->a:Ljava/lang/String;

    .line 13
    invoke-virtual {v2}, Ljava/lang/String;->hashCode()I

    move-result v3

    const v5, -0x7d025fa5

    const/4 v6, 0x2

    const/4 v7, -0x1

    const/4 v8, 0x1

    if-eq v3, v5, :cond_3

    const v5, -0x6f80242b

    if-eq v3, v5, :cond_2

    const v5, 0x2e6209e1

    if-eq v3, v5, :cond_1

    goto :goto_0

    :cond_1
    const-string v3, "jump_unknown_source"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    const/4 v2, 0x0

    goto :goto_1

    :cond_2
    const-string v3, "jump_file_manager_custom"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    const/4 v2, 0x2

    goto :goto_1

    :cond_3
    const-string v3, "jump_file_manager"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    const/4 v2, 0x1

    goto :goto_1

    :cond_4
    :goto_0
    const/4 v2, -0x1

    :goto_1
    if-eqz v2, :cond_b

    if-eq v2, v8, :cond_8

    if-eq v2, v6, :cond_5

    goto/16 :goto_5

    .line 14
    :cond_5
    invoke-static {p3}, Lcom/ss/android/socialbase/appdownloader/c;->b(Lorg/json/JSONObject;)Lcom/ss/android/socialbase/appdownloader/b;

    move-result-object p2

    .line 15
    iget p4, p2, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    if-eqz p4, :cond_6

    goto :goto_2

    .line 16
    :cond_6
    invoke-virtual {p1}, Les/zn0;->G0()Z

    move-result p2

    if-nez p2, :cond_7

    .line 17
    invoke-virtual {p1, v7}, Les/zn0;->j(I)I

    move-result p0

    iput p0, v1, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    goto :goto_5

    .line 18
    :cond_7
    invoke-static {p0, p1, p3, v1}, Lcom/ss/android/socialbase/appdownloader/c;->b(Landroid/content/Context;Les/zn0;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z

    move-result p0

    goto :goto_3

    .line 19
    :cond_8
    invoke-static {p3}, Lcom/ss/android/socialbase/appdownloader/c;->b(Lorg/json/JSONObject;)Lcom/ss/android/socialbase/appdownloader/b;

    move-result-object p2

    .line 20
    iget p4, p2, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    if-eqz p4, :cond_9

    .line 21
    new-instance p0, Ljava/lang/StringBuilder;

    invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V

    const-string p3, "runAntiHijack jump_file_manager break, error_code = "

    invoke-virtual {p0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p3, p2, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    invoke-virtual {p0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-static {v4, p0}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    :goto_2
    move-object v1, p2

    goto :goto_5

    .line 22
    :cond_9
    invoke-virtual {p1}, Les/zn0;->G0()Z

    move-result p2

    if-nez p2, :cond_a

    const-string p0, "runAntiHijack jump_file_manager savePathRedirected error"

    .line 23
    invoke-static {v4, p0}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 24
    invoke-virtual {p1, v7}, Les/zn0;->j(I)I

    move-result p0

    iput p0, v1, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    goto :goto_5

    :cond_a
    const-string p2, "runAntiHijack jump_file_manager start jumpFileManagerPage"

    .line 25
    invoke-static {v4, p2}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 26
    invoke-static {p0, p1, p3, v1}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Les/zn0;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z

    move-result p0

    :goto_3
    move v0, p0

    goto :goto_5

    .line 27
    :cond_b
    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v3, 0x1a

    if-ge v2, v3, :cond_c

    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->b()Z

    move-result v2

    if-eqz v2, :cond_f

    :cond_c
    const-string v2, "enable_for_all"

    .line 28
    invoke-virtual {p3, v2, v0}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v2

    if-ne v2, v8, :cond_d

    goto :goto_4

    :cond_d
    const/4 v8, 0x0

    :goto_4
    if-nez v8, :cond_e

    if-eqz p4, :cond_f

    .line 29
    :cond_e
    invoke-static {p0, p2, p3, v1}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z

    move-result v0

    :cond_f
    :goto_5
    if-eqz v0, :cond_10

    .line 30
    invoke-virtual {p1}, Les/zn0;->I0()Landroid/os/Bundle;

    move-result-object p0

    invoke-virtual {v1}, Lcom/ss/android/socialbase/appdownloader/b;->a()Ljava/lang/String;

    move-result-object p2

    const-string p3, "anti_hijack_attempt"

    invoke-virtual {p0, p3, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 31
    :cond_10
    sget-object p0, Lcom/ss/android/socialbase/appdownloader/c;->a:Lcom/ss/android/socialbase/appdownloader/c$e;

    if-eqz p0, :cond_11

    .line 32
    invoke-interface {p0, p1, v1}, Lcom/ss/android/socialbase/appdownloader/c$e;->a(Les/zn0;Lcom/ss/android/socialbase/appdownloader/b;)V

    :cond_11
    :goto_6
    return v0
.end method

.method protected static a(Landroid/content/Context;Les/zn0;Landroid/content/Intent;Z)Z
    .locals 6

    .line 3
    invoke-virtual {p1}, Les/zn0;->N0()I

    move-result v0

    invoke-static {v0}, Les/jo0;->a(I)Les/jo0;

    move-result-object v0

    const-string v1, "anti_plans"

    invoke-virtual {v0, v1}, Les/jo0;->e(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v2

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v2, :cond_1

    .line 5
    invoke-virtual {v0, v3}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    if-eqz v4, :cond_0

    .line 6
    invoke-static {v4}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONObject;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 7
    invoke-static {p0, p1, p2, v4, p3}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Les/zn0;Landroid/content/Intent;Lorg/json/JSONObject;Z)Z

    move-result v4

    if-eqz v4, :cond_0

    const/4 v1, 0x1

    goto :goto_1

    :cond_0
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_1
    :goto_1
    return v1
.end method

.method private static a(Landroid/content/Context;Les/zn0;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z
    .locals 16

    move-object/from16 v1, p0

    move-object/from16 v2, p1

    move-object/from16 v3, p2

    move-object/from16 v4, p3

    const/4 v5, 0x0

    if-eqz v1, :cond_7

    if-nez v3, :cond_0

    goto/16 :goto_4

    :cond_0
    const-string v0, "device_plans"

    .line 40
    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 41
    iput-object v0, v4, Lcom/ss/android/socialbase/appdownloader/b;->e:Ljava/lang/String;

    .line 42
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "jumpFileManagerPage devicePlans = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    const-string v7, "AntiHijackUtils"

    invoke-static {v7, v6}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 43
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-nez v6, :cond_7

    const-string v6, ","

    .line 44
    invoke-virtual {v0, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    .line 45
    invoke-virtual/range {p1 .. p1}, Les/zn0;->R0()Ljava/lang/String;

    move-result-object v0

    .line 46
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v8

    if-eqz v8, :cond_1

    return v5

    .line 47
    :cond_1
    new-instance v8, Ljava/io/File;

    invoke-direct {v8, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 48
    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    .line 49
    array-length v11, v6

    const/4 v12, 0x0

    :goto_0
    const/4 v13, 0x1

    if-ge v12, v11, :cond_5

    aget-object v14, v6, v12

    .line 50
    invoke-static {v1, v14, v3, v2}, Les/kl0;->a(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;Les/zn0;)Les/hl0;

    move-result-object v0

    if-eqz v0, :cond_4

    .line 51
    invoke-interface {v0}, Les/ll0;->b()Landroid/content/Intent;

    move-result-object v0

    .line 52
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "try startActivity : "

    invoke-virtual {v15, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v15, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-static {v7, v10}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    if-eqz v0, :cond_3

    .line 53
    invoke-static {v8, v2, v3}, Lcom/ss/android/socialbase/appdownloader/c;->a(Ljava/io/File;Les/zn0;Lorg/json/JSONObject;)Z

    move-result v10

    if-eqz v10, :cond_2

    .line 54
    :try_start_0
    new-instance v10, Ljava/lang/StringBuilder;

    invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V

    const-string v15, "using jumpFileManagerPage plan : "

    invoke-virtual {v10, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-static {v7, v10}, Les/wn0;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 55
    invoke-static {v1, v0, v5}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Z)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-object v10, v14

    goto :goto_2

    :catchall_0
    move-exception v0

    const-string v10, "try startActivity failed : "

    .line 56
    invoke-static {v7, v10, v0}, Les/wn0;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 57
    invoke-virtual {v9, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v10, " startActivity failed : "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {v0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 58
    invoke-static {v4, v13}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    goto :goto_1

    :cond_2
    const/4 v0, 0x6

    .line 59
    invoke-static {v4, v0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    .line 60
    invoke-virtual {v9, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, " createDescFile failed! "

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_1

    :cond_3
    const/4 v0, 0x3

    .line 61
    invoke-static {v4, v0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    .line 62
    invoke-virtual {v9, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, " resolveActivity failed! "

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    :cond_4
    :goto_1
    const-string v0, "  "

    .line 63
    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int/lit8 v12, v12, 0x1

    goto :goto_0

    :cond_5
    const/4 v10, 0x0

    const/4 v13, 0x0

    :goto_2
    if-nez v13, :cond_6

    .line 64
    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, v4, Lcom/ss/android/socialbase/appdownloader/b;->c:Ljava/lang/String;

    goto :goto_3

    .line 65
    :cond_6
    iput-object v10, v4, Lcom/ss/android/socialbase/appdownloader/b;->d:Ljava/lang/String;

    .line 66
    iput v5, v4, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    :goto_3
    return v13

    :cond_7
    :goto_4
    return v5
.end method

.method private static a(Ljava/io/File;Les/zn0;Lorg/json/JSONObject;)Z
    .locals 2
    .param p2    # Lorg/json/JSONObject;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const/4 p2, 0x0

    if-nez p0, :cond_0

    return p2

    .line 109
    :cond_0
    invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object p0

    .line 110
    invoke-virtual {p1}, Les/zn0;->N0()I

    move-result p1

    invoke-static {p1}, Les/jo0;->a(I)Les/jo0;

    move-result-object p1

    const-string v0, "anti_hijack_dir"

    invoke-virtual {p1, v0}, Les/jo0;->d(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p1

    const/4 v0, 0x0

    if-eqz p1, :cond_1

    const-string v1, "install_desc"

    .line 111
    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    goto :goto_0

    :cond_1
    move-object p1, v0

    .line 112
    :goto_0
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 113
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 114
    new-instance v0, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object p0, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    :cond_2
    if-eqz v0, :cond_3

    .line 115
    :try_start_0
    invoke-virtual {v0}, Ljava/io/File;->createNewFile()Z

    move-result p0

    if-eqz p0, :cond_3

    .line 116
    invoke-virtual {v0}, Ljava/io/File;->deleteOnExit()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    return p2

    :cond_3
    :goto_1
    const/4 p0, 0x1

    return p0
.end method

.method public static a(Lorg/json/JSONArray;)Z
    .locals 10

    const/4 v0, 0x1

    if-nez p0, :cond_0

    return v0

    .line 84
    :cond_0
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v1

    if-nez v1, :cond_1

    return v0

    :cond_1
    const/4 v0, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    :goto_0
    if-ge v2, v1, :cond_6

    .line 85
    invoke-virtual {p0, v2}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    if-eqz v4, :cond_5

    const-string v5, "package_names"

    .line 86
    invoke-virtual {v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "version_white"

    .line 87
    invoke-virtual {v4, v6}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v6

    const-string v7, "version_black"

    .line 88
    invoke-virtual {v4, v7}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 89
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_4

    if-nez v6, :cond_2

    if-nez v4, :cond_2

    goto :goto_2

    :cond_2
    const-string v7, ","

    .line 90
    invoke-virtual {v5, v7}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v5

    if-eqz v5, :cond_5

    .line 91
    array-length v7, v5

    const/4 v8, 0x0

    :goto_1
    if-ge v8, v7, :cond_5

    aget-object v9, v5, v8

    .line 92
    invoke-static {v9}, Lcom/ss/android/socialbase/appdownloader/c;->b(Ljava/lang/String;)Lcom/ss/android/socialbase/downloader/m/a$a;

    move-result-object v9

    if-eqz v9, :cond_3

    .line 93
    invoke-static {v6, v4, v9}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONArray;Lorg/json/JSONArray;Lcom/ss/android/socialbase/downloader/m/a$a;)Z

    move-result v3

    if-nez v3, :cond_3

    return v0

    :cond_3
    add-int/lit8 v8, v8, 0x1

    goto :goto_1

    :cond_4
    :goto_2
    return v0

    :cond_5
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_6
    return v3
.end method

.method private static a(Lorg/json/JSONArray;Ljava/lang/String;)Z
    .locals 4

    const/4 v0, 0x0

    if-eqz p0, :cond_2

    if-nez p1, :cond_0

    goto :goto_1

    .line 106
    :cond_0
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v1

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_2

    .line 107
    invoke-virtual {p0, v2}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    .line 108
    invoke-virtual {p1, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    const/4 p0, 0x1

    return p0

    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_2
    :goto_1
    return v0
.end method

.method private static a(Lorg/json/JSONArray;Lorg/json/JSONArray;Lcom/ss/android/socialbase/downloader/m/a$a;)Z
    .locals 2

    .line 99
    invoke-virtual {p2}, Lcom/ss/android/socialbase/downloader/m/a$a;->g()Ljava/lang/String;

    move-result-object v0

    .line 100
    invoke-virtual {p2}, Lcom/ss/android/socialbase/downloader/m/a$a;->f()I

    move-result p2

    .line 101
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p2, "_"

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    const/4 v0, 0x1

    if-eqz p0, :cond_0

    .line 102
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v1

    if-lez v1, :cond_0

    .line 103
    invoke-static {p0, p2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONArray;Ljava/lang/String;)Z

    move-result p0

    if-eqz p0, :cond_1

    goto :goto_0

    :cond_0
    if-eqz p1, :cond_1

    .line 104
    invoke-virtual {p1}, Lorg/json/JSONArray;->length()I

    move-result p0

    if-lez p0, :cond_1

    .line 105
    invoke-static {p1, p2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONArray;Ljava/lang/String;)Z

    move-result p0

    if-nez p0, :cond_1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private static a(Lorg/json/JSONObject;)Z
    .locals 4

    const/4 v0, 0x1

    if-nez p0, :cond_0

    return v0

    :cond_0
    const-string v1, "device_rom"

    .line 33
    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    .line 34
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_1

    return v0

    .line 35
    :cond_1
    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->f()Ljava/lang/String;

    move-result-object v1

    .line 36
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    const/4 v3, 0x0

    if-eqz v2, :cond_2

    return v3

    .line 37
    :cond_2
    invoke-virtual {p0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object p0

    .line 38
    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v1

    .line 39
    invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result p0

    if-eqz p0, :cond_3

    return v0

    :cond_3
    return v3
.end method

.method private static b(Lorg/json/JSONObject;)Lcom/ss/android/socialbase/appdownloader/b;
    .locals 8
    .annotation build Landroidx/annotation/NonNull;
    .end annotation

    .line 15
    new-instance v0, Lcom/ss/android/socialbase/appdownloader/b;

    invoke-direct {v0}, Lcom/ss/android/socialbase/appdownloader/b;-><init>()V

    if-nez p0, :cond_0

    return-object v0

    :cond_0
    const-string v1, "type"

    .line 16
    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 17
    iput-object v1, v0, Lcom/ss/android/socialbase/appdownloader/b;->a:Ljava/lang/String;

    const-string v2, "device_requirements"

    .line 18
    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    .line 19
    :try_start_0
    invoke-static {v2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lorg/json/JSONArray;)Z

    move-result v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v2, :cond_1

    const/4 p0, 0x2

    .line 20
    invoke-static {v0, p0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    return-object v0

    :cond_1
    const-string v2, "jump_file_manager_custom"

    .line 21
    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const/4 v2, 0x3

    const/4 v3, 0x0

    if-eqz v1, :cond_3

    const-string v1, "custom"

    .line 22
    iput-object v1, v0, Lcom/ss/android/socialbase/appdownloader/b;->e:Ljava/lang/String;

    .line 23
    invoke-static {}, Lcom/ss/android/socialbase/downloader/downloader/c;->b()Landroid/content/Context;

    move-result-object v4

    invoke-static {v4, v1, p0}, Les/kl0;->a(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;)Z

    move-result p0

    if-eqz p0, :cond_2

    .line 24
    iput v3, v0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    return-object v0

    .line 25
    :cond_2
    invoke-static {v0, v2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    goto :goto_1

    :cond_3
    const-string v1, "device_plans"

    .line 26
    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 27
    iput-object v1, v0, Lcom/ss/android/socialbase/appdownloader/b;->e:Ljava/lang/String;

    .line 28
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_5

    const-string v4, ","

    .line 29
    invoke-virtual {v1, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    .line 30
    array-length v4, v1

    const/4 v5, 0x0

    :goto_0
    if-ge v5, v4, :cond_5

    aget-object v6, v1, v5

    .line 31
    invoke-static {}, Lcom/ss/android/socialbase/downloader/downloader/c;->b()Landroid/content/Context;

    move-result-object v7

    invoke-static {v7, v6, p0}, Les/kl0;->a(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 32
    iput v3, v0, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    return-object v0

    .line 33
    :cond_4
    invoke-static {v0, v2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    :cond_5
    :goto_1
    return-object v0

    :catchall_0
    move-exception p0

    .line 34
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "checkJumpFileManagerConfig"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object p0

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    iput-object p0, v0, Lcom/ss/android/socialbase/appdownloader/b;->c:Ljava/lang/String;

    const/4 p0, 0x4

    .line 35
    invoke-static {v0, p0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Lcom/ss/android/socialbase/appdownloader/b;I)V

    return-object v0
.end method

.method private static b(Ljava/lang/String;)Lcom/ss/android/socialbase/downloader/m/a$a;
    .locals 3

    .line 36
    sget-object v0, Lcom/ss/android/socialbase/appdownloader/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0, p0}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 37
    sget-object v0, Lcom/ss/android/socialbase/appdownloader/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0, p0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/ss/android/socialbase/downloader/m/a$a;

    if-eqz p0, :cond_1

    move-object v1, p0

    goto :goto_0

    .line 38
    :cond_0
    invoke-static {p0}, Lcom/ss/android/socialbase/downloader/m/a;->a(Ljava/lang/String;)Lcom/ss/android/socialbase/downloader/m/a$a;

    move-result-object v0

    .line 39
    sget-object v2, Lcom/ss/android/socialbase/appdownloader/c;->b:Ljava/util/HashMap;

    invoke-virtual {v2, p0, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    if-eqz v0, :cond_1

    move-object v1, v0

    :cond_1
    :goto_0
    return-object v1
.end method

.method static synthetic b(Landroid/content/Context;)Z
    .locals 0

    .line 1
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->d(Landroid/content/Context;)Z

    move-result p0

    return p0
.end method

.method private static b(Landroid/content/Context;Landroid/content/Intent;)Z
    .locals 1

    const/4 v0, 0x1

    .line 40
    invoke-static {p0, p1, v0}, Lcom/ss/android/socialbase/appdownloader/c;->a(Landroid/content/Context;Landroid/content/Intent;Z)Z

    move-result p0

    return p0
.end method

.method private static b(Landroid/content/Context;Les/zn0;Lorg/json/JSONObject;Lcom/ss/android/socialbase/appdownloader/b;)Z
    .locals 4
    .param p1    # Les/zn0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # Lcom/ss/android/socialbase/appdownloader/b;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const/4 v0, 0x0

    if-eqz p0, :cond_7

    if-nez p2, :cond_0

    goto :goto_2

    .line 2
    :cond_0
    invoke-virtual {p1}, Les/zn0;->R0()Ljava/lang/String;

    move-result-object v1

    .line 3
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1

    return v0

    :cond_1
    const-string v2, "custom"

    .line 4
    iput-object v2, p3, Lcom/ss/android/socialbase/appdownloader/b;->d:Ljava/lang/String;

    .line 5
    invoke-static {p0, v2, p2, p1}, Les/kl0;->a(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;Les/zn0;)Les/hl0;

    move-result-object v2

    if-eqz v2, :cond_6

    .line 6
    invoke-virtual {v2}, Les/hl0;->a()Z

    move-result v3

    if-nez v3, :cond_2

    goto :goto_1

    .line 7
    :cond_2
    invoke-interface {v2}, Les/ll0;->b()Landroid/content/Intent;

    move-result-object v2

    if-nez v2, :cond_3

    return v0

    .line 8
    :cond_3
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 9
    invoke-static {v3, p1, p2}, Lcom/ss/android/socialbase/appdownloader/c;->a(Ljava/io/File;Les/zn0;Lorg/json/JSONObject;)Z

    move-result p1

    if-eqz p1, :cond_5

    .line 10
    invoke-static {p0, v2}, Lcom/ss/android/socialbase/appdownloader/c;->b(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result p0

    const/4 p1, 0x1

    if-eqz p0, :cond_4

    .line 11
    iput v0, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    return p1

    .line 12
    :cond_4
    iput p1, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    goto :goto_0

    :cond_5
    const/4 p0, 0x6

    .line 13
    iput p0, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    :goto_0
    return v0

    :cond_6
    :goto_1
    const/4 p0, 0x3

    .line 14
    iput p0, p3, Lcom/ss/android/socialbase/appdownloader/b;->b:I

    :cond_7
    :goto_2
    return v0
.end method

.method static synthetic c(Landroid/content/Context;)Z
    .locals 0

    .line 1
    invoke-static {p0}, Lcom/ss/android/socialbase/appdownloader/c;->e(Landroid/content/Context;)Z

    move-result p0

    return p0
.end method

.method private static d(Landroid/content/Context;)Z
    .locals 2

    const/4 v0, 0x1

    if-nez p0, :cond_0

    return v0

    .line 1
    :cond_0
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object p0

    const-string v1, "install_non_market_apps"

    invoke-static {p0, v1, v0}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-lez p0, :cond_1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :catchall_0
    :goto_0
    return v0
.end method

.method private static e(Landroid/content/Context;)Z
    .locals 1

    const/4 v0, 0x1

    if-nez p0, :cond_0

    return v0

    .line 1
    :cond_0
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object p0

    invoke-virtual {p0}, Landroid/content/pm/PackageManager;->canRequestPackageInstalls()Z

    move-result p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return p0

    :catchall_0
    return v0
.end method
